cluster=$1
config_path=$2
type=$3

source ${config_path}/config.sh

${Rscript_archr} ${scripts_dir}/chromvar_p2gene.R \
--comine_data_file ${output_dir}/qc_atac_v3/${type}/testis_combined_peak.combineRNA.qc.Rdata \
--peak_gene_file ${output_dir}/celltype_plot/peak2gene/${type}/peakToGeneHeatmap_LabelClust_k25.tsv \
--cluster_type_file ${config_path}/cluster_celltype.csv \
--cluster ${cluster} \
--out_path ${output_dir}/subcell/${cluster} \
2> ${log_path}/chromvar_p2gene.${cluster}.log
